#include <STC15F2K60S2.H>
#include "smg.h"

//关闭 蜂鸣器继电器LED数码管
void All_Init(void)
{
	P2 = 0xA0;	// 1010 0000
	P0 = 0x00;	//off蜂鸣器继电器
	
	P2 = 0x80;	// 1000 0000
	P0 = 0xFF;	//offLED
	
	P2 = 0xC0;	//使能锁存器U8 1100 0000
	P0 = 0xFF;	//选择所有数码管
	P2 = 0xFF;	//使能锁存器U7 1111 1111
	P0 = 0xFF;	//关闭所有数码管
}

void main()
{
	All_Init();	
	while(1)
	{
		Nixie(1,1);
		Nixie(2,0);	
		Nixie(3,2);	
		Nixie(4,4);
		Nixie(5,1);
		Nixie(6,0);
		Nixie(7,2);
		Nixie(8,4);
		
	}
}
